package cn.itcast.service.impl;

import cn.itcast.mapper.FeedbackMapper;
import cn.itcast.pojo.Dborder;
import cn.itcast.pojo.Feedback;
import cn.itcast.service.FeedbackService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FeedbackServiceImpl implements FeedbackService {

    @Resource
    private FeedbackMapper feedbackMapper;

    @Override
    public boolean addFeedback(Feedback feedback) {
        return feedbackMapper.insertFeedback(feedback) > 0;
    }

    @Override
    public List<Feedback> feedbackList(String openId) {
        return feedbackMapper.queryByOpenId(openId);
    }

    @Override
    public boolean adddb(Dborder dborder) {
        return feedbackMapper.adddb(dborder);
    }

    @Override
    public List<Dborder> openidselectdb(String openid) {
        return feedbackMapper.openidselectdbmapp(openid);
    }

    @Override
    public boolean updateopenidstatus(Dborder dborder) {
        return feedbackMapper.updateopenidstatusmapp(dborder);
    }
}
